<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>物流合作伙伴</title>
    <script src="https://cdn.tailwindcss.com"></script>
    <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css" rel="stylesheet">
    <style>
        body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
        }
    </style>
</head>
<body class="bg-gray-100">
    <div class="mx-auto max-w-[393px] h-[852px] bg-white relative overflow-hidden rounded-[40px] shadow-2xl">
        <!-- Status Bar -->
        <div class="bg-white px-6 pt-3 pb-2">
            <div class="flex justify-between items-center text-xs">
                <span class="font-semibold">9:41</span>
                <div class="flex space-x-1">
                    <i class="fas fa-signal"></i>
                    <i class="fas fa-wifi"></i>
                    <i class="fas fa-battery-full"></i>
                </div>
            </div>
        </div>

        <!-- Header -->
        <div class="bg-gradient-to-r from-blue-600 to-cyan-600 px-4 py-3">
            <div class="flex items-center justify-between text-white">
                <a href="logistics-hub.html" class="text-white">
                    <i class="fas fa-arrow-left text-lg"></i>
                </a>
                <h1 class="text-lg font-semibold">物流合作伙伴</h1>
                <button onclick="addNewPartner()" class="text-white">
                    <i class="fas fa-plus text-lg"></i>
                </button>
            </div>
        </div>

        <!-- Partnership Overview -->
        <div class="px-4 py-3 bg-gradient-to-r from-blue-600 to-cyan-600">
            <div class="bg-white/10 backdrop-blur-sm rounded-xl p-3">
                <div class="grid grid-cols-3 gap-3 text-white text-center">
                    <div>
                        <p class="text-lg font-bold">12</p>
                        <p class="text-xs opacity-80">合作伙伴</p>
                    </div>
                    <div>
                        <p class="text-lg font-bold">98.8%</p>
                        <p class="text-xs opacity-80">平均准时率</p>
                    </div>
                    <div>
                        <p class="text-lg font-bold">15.6万</p>
                        <p class="text-xs opacity-80">月发货量</p>
                    </div>
                </div>
            </div>
        </div>

        <!-- Filter Tabs -->
        <div class="px-4 py-2 bg-white border-b border-gray-200">
            <div class="flex space-x-2 overflow-x-auto">
                <button onclick="filterPartners('all')" id="filter-all" class="bg-blue-500 text-white text-xs px-3 py-2 rounded-lg whitespace-nowrap">
                    全部合作伙伴
                </button>
                <button onclick="filterPartners('strategic')" id="filter-strategic" class="bg-gray-100 text-gray-600 text-xs px-3 py-2 rounded-lg whitespace-nowrap">
                    战略合作
                </button>
                <button onclick="filterPartners('preferred')" id="filter-preferred" class="bg-gray-100 text-gray-600 text-xs px-3 py-2 rounded-lg whitespace-nowrap">
                    优选合作
                </button>
                <button onclick="filterPartners('regional')" id="filter-regional" class="bg-gray-100 text-gray-600 text-xs px-3 py-2 rounded-lg whitespace-nowrap">
                    区域合作
                </button>
            </div>
        </div>

        <!-- Partners List -->
        <div class="h-[calc(852px-200px)] overflow-y-auto pb-24">
            <div class="p-4">
                <!-- Strategic Partners -->
                <div class="mb-6">
                    <h3 class="text-sm font-semibold text-gray-700 mb-3 flex items-center">
                        <i class="fas fa-star text-yellow-500 mr-2"></i>
                        战略合作伙伴
                    </h3>
                    <div class="space-y-3">
                        <!-- SF Express -->
                        <div class="bg-gradient-to-r from-red-50 to-orange-50 border border-red-200 rounded-xl p-4">
                            <div class="flex items-start">
                                <div class="w-16 h-16 bg-red-500 rounded-xl flex items-center justify-center text-white font-bold text-lg mr-4 flex-shrink-0">
                                    顺丰
                                </div>
                                <div class="flex-1">
                                    <div class="flex items-center justify-between mb-2">
                                        <h4 class="text-sm font-semibold text-gray-800">顺丰速运</h4>
                                        <span class="bg-red-500 text-white text-xs px-2 py-1 rounded-full">战略</span>
                                    </div>
                                    <div class="grid grid-cols-2 gap-3 text-xs mb-3">
                                        <div>
                                            <span class="text-gray-500">准时率: </span>
                                            <span class="font-bold text-green-600">99.2%</span>
                                        </div>
                                        <div>
                                            <span class="text-gray-500">月发货: </span>
                                            <span class="font-bold text-blue-600">4.2万单</span>
                                        </div>
                                        <div>
                                            <span class="text-gray-500">评分: </span>
                                            <span class="font-bold text-yellow-600">4.9分</span>
                                        </div>
                                        <div>
                                            <span class="text-gray-500">合作期: </span>
                                            <span class="font-bold text-purple-600">3年</span>
                                        </div>
                                    </div>
                                    <div class="flex justify-between items-center">
                                        <div class="flex items-center text-xs text-gray-500">
                                            <i class="fas fa-map-marker-alt mr-1"></i>
                                            <span>覆盖全国366城市</span>
                                        </div>
                                        <div class="flex space-x-2">
                                            <button onclick="viewPartnerDetail('SF')" class="bg-red-100 text-red-600 text-xs px-3 py-1 rounded-lg">详情</button>
                                            <button onclick="contactPartner('SF')" class="bg-blue-100 text-blue-600 text-xs px-3 py-1 rounded-lg">联系</button>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>

                        <!-- JD Logistics -->
                        <div class="bg-gradient-to-r from-blue-50 to-indigo-50 border border-blue-200 rounded-xl p-4">
                            <div class="flex items-start">
                                <div class="w-16 h-16 bg-blue-600 rounded-xl flex items-center justify-center text-white font-bold text-lg mr-4 flex-shrink-0">
                                    京东
                                </div>
                                <div class="flex-1">
                                    <div class="flex items-center justify-between mb-2">
                                        <h4 class="text-sm font-semibold text-gray-800">京东物流</h4>
                                        <span class="bg-blue-500 text-white text-xs px-2 py-1 rounded-full">战略</span>
                                    </div>
                                    <div class="grid grid-cols-2 gap-3 text-xs mb-3">
                                        <div>
                                            <span class="text-gray-500">准时率: </span>
                                            <span class="font-bold text-green-600">98.8%</span>
                                        </div>
                                        <div>
                                            <span class="text-gray-500">月发货: </span>
                                            <span class="font-bold text-blue-600">3.8万单</span>
                                        </div>
                                        <div>
                                            <span class="text-gray-500">评分: </span>
                                            <span class="font-bold text-yellow-600">4.8分</span>
                                        </div>
                                        <div>
                                            <span class="text-gray-500">合作期: </span>
                                            <span class="font-bold text-purple-600">2年</span>
                                        </div>
                                    </div>
                                    <div class="flex justify-between items-center">
                                        <div class="flex items-center text-xs text-gray-500">
                                            <i class="fas fa-clock mr-1"></i>
                                            <span>211限时达服务</span>
                                        </div>
                                        <div class="flex space-x-2">
                                            <button onclick="viewPartnerDetail('JD')" class="bg-blue-100 text-blue-600 text-xs px-3 py-1 rounded-lg">详情</button>
                                            <button onclick="contactPartner('JD')" class="bg-blue-100 text-blue-600 text-xs px-3 py-1 rounded-lg">联系</button>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>

                        <!-- Cainiao -->
                        <div class="bg-gradient-to-r from-orange-50 to-yellow-50 border border-orange-200 rounded-xl p-4">
                            <div class="flex items-start">
                                <div class="w-16 h-16 bg-orange-500 rounded-xl flex items-center justify-center text-white font-bold text-lg mr-4 flex-shrink-0">
                                    菜鸟
                                </div>
                                <div class="flex-1">
                                    <div class="flex items-center justify-between mb-2">
                                        <h4 class="text-sm font-semibold text-gray-800">菜鸟网络</h4>
                                        <span class="bg-orange-500 text-white text-xs px-2 py-1 rounded-full">战略</span>
                                    </div>
                                    <div class="grid grid-cols-2 gap-3 text-xs mb-3">
                                        <div>
                                            <span class="text-gray-500">准时率: </span>
                                            <span class="font-bold text-green-600">98.5%</span>
                                        </div>
                                        <div>
                                            <span class="text-gray-500">月发货: </span>
                                            <span class="font-bold text-blue-600">3.5万单</span>
                                        </div>
                                        <div>
                                            <span class="text-gray-500">评分: </span>
                                            <span class="font-bold text-yellow-600">4.7分</span>
                                        </div>
                                        <div>
                                            <span class="text-gray-500">合作期: </span>
                                            <span class="font-bold text-purple-600">1年</span>
                                        </div>
                                    </div>
                                    <div class="flex justify-between items-center">
                                        <div class="flex items-center text-xs text-gray-500">
                                            <i class="fas fa-globe mr-1"></i>
                                            <span>智能仓储网络</span>
                                        </div>
                                        <div class="flex space-x-2">
                                            <button onclick="viewPartnerDetail('CN')" class="bg-orange-100 text-orange-600 text-xs px-3 py-1 rounded-lg">详情</button>
                                            <button onclick="contactPartner('CN')" class="bg-blue-100 text-blue-600 text-xs px-3 py-1 rounded-lg">联系</button>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>

                <!-- Preferred Partners -->
                <div class="mb-6">
                    <h3 class="text-sm font-semibold text-gray-700 mb-3 flex items-center">
                        <i class="fas fa-heart text-pink-500 mr-2"></i>
                        优选合作伙伴
                    </h3>
                    <div class="space-y-3">
                        <!-- YTO Express -->
                        <div class="bg-white border border-gray-200 rounded-xl p-4">
                            <div class="flex items-start">
                                <div class="w-16 h-16 bg-green-500 rounded-xl flex items-center justify-center text-white font-bold text-lg mr-4 flex-shrink-0">
                                    圆通
                                </div>
                                <div class="flex-1">
                                    <div class="flex items-center justify-between mb-2">
                                        <h4 class="text-sm font-semibold text-gray-800">圆通速递</h4>
                                        <span class="bg-green-100 text-green-600 text-xs px-2 py-1 rounded-full">优选</span>
                                    </div>
                                    <div class="grid grid-cols-2 gap-3 text-xs mb-3">
                                        <div>
                                            <span class="text-gray-500">准时率: </span>
                                            <span class="font-bold text-green-600">97.8%</span>
                                        </div>
                                        <div>
                                            <span class="text-gray-500">月发货: </span>
                                            <span class="font-bold text-blue-600">2.1万单</span>
                                        </div>
                                        <div>
                                            <span class="text-gray-500">评分: </span>
                                            <span class="font-bold text-yellow-600">4.6分</span>
                                        </div>
                                        <div>
                                            <span class="text-gray-500">合作期: </span>
                                            <span class="font-bold text-purple-600">8个月</span>
                                        </div>
                                    </div>
                                    <div class="flex justify-between items-center">
                                        <div class="flex items-center text-xs text-gray-500">
                                            <i class="fas fa-truck mr-1"></i>
                                            <span>经济快递首选</span>
                                        </div>
                                        <div class="flex space-x-2">
                                            <button onclick="viewPartnerDetail('YTO')" class="bg-green-100 text-green-600 text-xs px-3 py-1 rounded-lg">详情</button>
                                            <button onclick="contactPartner('YTO')" class="bg-blue-100 text-blue-600 text-xs px-3 py-1 rounded-lg">联系</button>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>

                        <!-- ZTO Express -->
                        <div class="bg-white border border-gray-200 rounded-xl p-4">
                            <div class="flex items-start">
                                <div class="w-16 h-16 bg-purple-500 rounded-xl flex items-center justify-center text-white font-bold text-lg mr-4 flex-shrink-0">
                                    中通
                                </div>
                                <div class="flex-1">
                                    <div class="flex items-center justify-between mb-2">
                                        <h4 class="text-sm font-semibold text-gray-800">中通快递</h4>
                                        <span class="bg-green-100 text-green-600 text-xs px-2 py-1 rounded-full">优选</span>
                                    </div>
                                    <div class="grid grid-cols-2 gap-3 text-xs mb-3">
                                        <div>
                                            <span class="text-gray-500">准时率: </span>
                                            <span class="font-bold text-green-600">97.5%</span>
                                        </div>
                                        <div>
                                            <span class="text-gray-500">月发货: </span>
                                            <span class="font-bold text-blue-600">1.9万单</span>
                                        </div>
                                        <div>
                                            <span class="text-gray-500">评分: </span>
                                            <span class="font-bold text-yellow-600">4.5分</span>
                                        </div>
                                        <div>
                                            <span class="text-gray-500">合作期: </span>
                                            <span class="font-bold text-purple-600">6个月</span>
                                        </div>
                                    </div>
                                    <div class="flex justify-between items-center">
                                        <div class="flex items-center text-xs text-gray-500">
                                            <i class="fas fa-coins mr-1"></i>
                                            <span>性价比之选</span>
                                        </div>
                                        <div class="flex space-x-2">
                                            <button onclick="viewPartnerDetail('ZTO')" class="bg-purple-100 text-purple-600 text-xs px-3 py-1 rounded-lg">详情</button>
                                            <button onclick="contactPartner('ZTO')" class="bg-blue-100 text-blue-600 text-xs px-3 py-1 rounded-lg">联系</button>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>

                <!-- Performance Metrics -->
                <div class="bg-white rounded-xl p-4 shadow-sm mb-6">
                    <h3 class="text-sm font-semibold text-gray-700 mb-3">合作伙伴表现</h3>
                    <div class="space-y-3">
                        <div class="flex items-center justify-between">
                            <span class="text-sm text-gray-600">整体满意度</span>
                            <div class="flex items-center">
                                <div class="w-20 bg-gray-200 rounded-full h-2 mr-2">
                                    <div class="bg-green-500 h-2 rounded-full" style="width: 95%"></div>
                                </div>
                                <span class="text-sm font-bold text-green-600">95%</span>
                            </div>
                        </div>
                        <div class="flex items-center justify-between">
                            <span class="text-sm text-gray-600">服务响应速度</span>
                            <div class="flex items-center">
                                <div class="w-20 bg-gray-200 rounded-full h-2 mr-2">
                                    <div class="bg-blue-500 h-2 rounded-full" style="width: 92%"></div>
                                </div>
                                <span class="text-sm font-bold text-blue-600">92%</span>
                            </div>
                        </div>
                        <div class="flex items-center justify-between">
                            <span class="text-sm text-gray-600">成本效益</span>
                            <div class="flex items-center">
                                <div class="w-20 bg-gray-200 rounded-full h-2 mr-2">
                                    <div class="bg-orange-500 h-2 rounded-full" style="width: 88%"></div>
                                </div>
                                <span class="text-sm font-bold text-orange-600">88%</span>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <script>
        // Filter partners by category
        function filterPartners(category) {
            // Remove active styles from all filter buttons
            document.querySelectorAll('[id^="filter-"]').forEach(btn => {
                btn.classList.remove('bg-blue-500', 'text-white');
                btn.classList.add('bg-gray-100', 'text-gray-600');
            });
            
            // Add active styles to selected button
            document.getElementById('filter-' + category).classList.remove('bg-gray-100', 'text-gray-600');
            document.getElementById('filter-' + category).classList.add('bg-blue-500', 'text-white');
            
            // In a real app, this would filter the partners list
            showToast('筛选：' + getFilterName(category));
        }

        function getFilterName(category) {
            const names = {
                'all': '全部合作伙伴',
                'strategic': '战略合作',
                'preferred': '优选合作',
                'regional': '区域合作'
            };
            return names[category] || '全部合作伙伴';
        }

        // View partner detail
        function viewPartnerDetail(partnerId) {
            alert(`查看合作伙伴详情\n伙伴ID: ${partnerId}\n\n将显示详细的合作信息、服务能力、覆盖范围等...`);
        }

        // Contact partner
        function contactPartner(partnerId) {
            if (confirm(`联系合作伙伴 ${partnerId}？\n\n将为您转接专属客户经理`)) {
                alert(`正在为您联系 ${partnerId} 的客户经理...\n\n预计1分钟内回电，请保持手机畅通`);
                showToast('联系请求已发送');
            }
        }

        // Add new partner
        function addNewPartner() {
            alert('添加新的物流合作伙伴\n\n功能包括：\n• 合作伙伴资质审核\n• 服务能力评估\n• 合作协议签署\n• 系统对接测试');
        }

        // Show toast message
        function showToast(message) {
            const toast = document.createElement('div');
            toast.className = 'fixed top-20 left-1/2 transform -translate-x-1/2 bg-gray-800 text-white px-4 py-2 rounded-lg text-sm z-50';
            toast.textContent = message;
            document.body.appendChild(toast);
            
            setTimeout(() => {
                toast.remove();
            }, 2000);
        }

        // Initialize page
        document.addEventListener('DOMContentLoaded', function() {
            filterPartners('all');
        });
    </script>
</body>
</html>